// 导入路由
import { BrowserRouter as Router, Route } from 'react-router-dom'

import './App.css'

// 导入页面组件
import Login from './pages/Login'
import Layout from './pages/Layout'

// 配置路由规则
const App = () => {
  return (
    <Router>
      <div className="App">
        {/* 测试路由切换 */}
        {/* <Link to="/login">登录</Link>
        <Link to="/home">后台</Link> */}

        {/* 配置路由 */}
        <Route path="/home" component={Layout}></Route>
        <Route path="/login" component={Login}></Route>
      </div>
    </Router>
  )
}
export default App
